Subject: Re: Aspect ratio from display database -- How?
From: [email-masked] (Peter Cherna)
Date: 18 Nov 92 17:04:51 GMT
Newsgroups: comp.sys.amiga.programmer

In article <[email-masked]> [email-masked] (Stuart H. Ferguson) writes:
>I want to open a screen that mimics the Workbench so my program will run
>under the user's prefered display configuration.  I think I understand
>about public screen and mode-id's and the display database.

For a given mode ID, you can find much of what you need in the DisplayInfo
structure.  You can use GetDisplayInfoData() with the DTAG_DISP option
to get this structure.  The DisplayInfo.Resolution field gives you the
"ticks" per pixel of a given mode.  Ticks are an arbitrary unit, but
the number of ticks on a display is a crude constant.  That is to say,
it's typically of the same order, regardless of monitor type.  The
ratio of Resolution.X to Resolution.Y is the aspect ratio.

How ticks per pixel converts to pixels per inch is not defined, but
there might be a way in the future for the user to effectively measure
pixels per inch on his particular screen, and inform the system.

>		Stuart Ferguson		([email-masked])

     Peter